import numpy as np
np.set_printoptions(threshold=np.inf)

S = 8
grid = X, Y, Z = np.mgrid[:S, :S, :S]
print(grid)
